<?php
namespace app\service\data;

use app\service\models as models;

class Config
{
    
    private $dsConfig;
    
    public function __construct()
    {
        $this->dsConfig = new models\Config();
        
    }
    
    /**
     * 编辑页脚
     *
     * @param unknown $data
     * @return unknown
     */
    public function EditFooter($arrInput)
    {
        $dataObj = $this->dsConfig->find()
            ->where(['name' => 'footer'])->one();
        if(!$dataObj){
            return false;
        }
        $dataObj->name= $arrInput['name'];
        $dataObj->value= $arrInput['value'];
        $save = $dataObj->save();
        return $save;
    }
  
}
